<script type="text/javascript" src="/js/app/test.js"></script>
<script>
	$(document).ready(function() {
		$("#file").kendoUpload({
			async: {
				saveUrl: "/utility/upload",
				removeUrl: "/utility/remove",
				autoUpload: true
			},
			success: onSuccess
		});
	});
	
	function onSuccess(e)
	{
		if(e.operation == "upload")
		{
			if(e.response.status == "success")
			{
				$("#_file").val(e.response.path);
			}
		}
		else if(e.operation == "remove")
		{
			if(e.response.status == "success")
			{
				$("#_file").val("");
			}
		}
	}
	
	function saveUpload(){
		alert($("#_file").val());
	}
</script>

<div>
<form method="post">
DEMO UPLOAD
<input name="file" id="file" type="file" />
</div>
<input type="hidden" name="fileUrl" id="_file"/>

<input type="submit" value="Save" />
</form>